import { userUpdateSchema } from "@/validators/user";
export default defineEventHandler(async (event) => {
  const result = await runValidate(userUpdateSchema, event);
  const newUser = UserSchema.findByIdAndUpdate(result.data._id, result.data, {
    new: true,
  });
  return newUser;
});
